<!--
/**
 * 代码生成示例主 列表页 JS 脚本
 * @author 李方捷 , leefangjie@qq.com
 * @since 2022-02-08 08:53:57
 */
 -->
 <!DOCTYPE html>
<html>

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8"/>
    <title th:text="${lang.translate('代码生成示例主')}">代码生成示例主</title>
    <link th:if(theme.ico!="null") rel="shortcut icon" th:href="${theme.ico}" type="image/vnd.microsoft.icon">
    <link th:if(theme.ico!="null") rel="icon" th:href="theme.ico" type="image/vnd.microsoft.icon">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/assets/libs/layui/css/layui.css" th:href="'/assets/libs/layui/css/layui.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/css/admin.css" th:href="'/assets/css/admin.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/libs/toast/css/toast.css" type="text/css" th:href="'/assets/libs/toast/css/toast.css?'+${cacheKey}">
    <link rel="stylesheet" href="/assets/css/foxnic-web.css" th:href="'/assets/css/foxnic-web.css?'+${cacheKey}">
    <link href="/assets/libs/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/assets/libs/material-design-webfont/css/material-design-icons-min.css" rel="stylesheet">
    <script th:inline="javascript">var foxnic_cachekey=[[${cacheKey}]];</script>
    <style>
    </style>
    <link th:each="css:${theme.css}" rel="stylesheet" th:href="${css}+'?'+${cacheKey}">
</head>

<body style="overflow-y: hidden">

<div class="layui-card">

    <div class="layui-card-body" style="">

        <div class="search-bar" style="">

            <div class="search-input-rows" style="opacity: 0">
                <!-- 搜索输入区域 -->
                <div class="layui-form toolbar search-inputs">
                    <!-- ID , id ,typeName=text_input, isHideInSearch=true -->
                    <!-- 图片上传 , imageId ,typeName=upload, isHideInSearch=true -->
                    <!-- 多文件上传 , fileIds ,typeName=upload, isHideInSearch=true -->
                    <!-- 对话框 , buttonInput ,typeName=button, isHideInSearch=true -->
                    <!-- 工作时间 , workTime ,typeName=date_input, isHideInSearch=true -->
                    <!-- 角色 , roleIds ,typeName=select_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:50px"><span th:text="${lang.translate('角色')}" class="search-label roleIds-label">角色</span><span class="search-colon">:</span></div>
                        <div id="roleIds" th:data="${'/service-oauth/sys-role/query-list'}" style="width:140px" extraParam="{}"></div>
                    </div>
                    <!-- 角色数(Java) , roleCountByAfter ,typeName=text_input, isHideInSearch=true -->
                    <!-- 角色数(SQL) , roleCountByJoin ,typeName=text_input, isHideInSearch=true -->
                    <!-- 单行文本 , name ,typeName=text_input, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:80px"><span th:text="${lang.translate('单行文本')}" class="search-label name-label">单行文本</span><span class="search-colon">:</span></div>
                        <input id="name" class="layui-input search-input" style="width: 140px" type="text" />
                    </div>
                    <!-- 多行文本 , notes ,typeName=text_area, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('多行文本')}" class="search-label notes-label">多行文本</span><span class="search-colon">:</span></div>
                        <input id="notes" class="layui-input search-input" style="width: 140px" type="text" />
                    </div>
                    <!-- 整数输入 , area ,typeName=number_input, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('整数输入')}" class="search-label area-label">整数输入</span><span class="search-colon">:</span></div>
                            <input id="area-begin" class="layui-input search-input" style="width: 67px" type="text" autocomplete="off" input-type="number_input"  integer="true" decimal="false" allow-negative="false" step="2.0" min-value="" max-value="" scale="0"/>
                            <span class="search-dash">-</span>
                            <input id="area-end" class="layui-input search-input" style="width: 67px" type="text" autocomplete="off" input-type="number_input"  integer="true" decimal="false" allow-negative="false" step="2.0" min-value="" max-value="" scale="0"/>
                    </div>


                </div>
                <!-- 搜索输入区域 -->
                <div class="layui-form toolbar search-inputs">
                    <!-- 状态 , checkDict ,typeName=check_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:50px"><span th:text="${lang.translate('状态')}" class="search-label checkDict-label">状态</span><span class="search-colon">:</span></div>

                                <div id="checkDict" th:data="${dict.toArray('order_status')}" style="width:140px"></div>


                    </div>
                    <!-- 小数输入 , weight ,typeName=number_input, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:80px"><span th:text="${lang.translate('小数输入')}" class="search-label weight-label">小数输入</span><span class="search-colon">:</span></div>
                            <input id="weight" class="layui-input search-input" style="width: 140px" type="text" autocomplete="off" input-type="number_input" integer="false" decimal="true" allow-negative="true" step="0.5" min-value="-10.5" max-value="16.6" scale="2"/>
                    </div>
                    <!-- 逻辑值 , valid ,typeName=logic_switch, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('逻辑值')}" class="search-label valid-label">逻辑值</span><span class="search-colon">:</span></div>
                        <div id="valid" data='[{"name":"有效","value":"1"},{"name":"无效","value":"0"}]' style="width:140px"></div>
                    </div>
                    <!-- 选择框(查询) , resourceId ,typeName=select_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('选择框(查询)')}" class="search-label resourceId-label">选择框(查询)</span><span class="search-colon">:</span></div>
                         <input id="resourceId" class="layui-input search-input" style="width: 150px" type="text" />
                    </div>


                </div>
                <!-- 搜索输入区域 -->
                <div class="layui-form toolbar search-inputs">
                    <!-- 枚举 , radioEnum ,typeName=radio_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:50px"><span th:text="${lang.translate('枚举')}" class="search-label radioEnum-label">枚举</span><span class="search-colon">:</span></div>


                        <div id="radioEnum" th:data="${enum.toArray('org.github.foxnic.web.constants.enums.system.Language')}" style="width:140px"></div>

                    </div>
                    <!-- 性别 , radioDict ,typeName=radio_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:80px"><span th:text="${lang.translate('性别')}" class="search-label radioDict-label">性别</span><span class="search-colon">:</span></div>

                        <div id="radioDict" th:data="${dict.toArray('sex')}" style="width:140px"></div>


                    </div>
                    <!-- 复选框(枚举) , checkEnum ,typeName=check_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('复选框(枚举)')}" class="search-label checkEnum-label">复选框(枚举)</span><span class="search-colon">:</span></div>


                                <div id="checkEnum" th:data="${enum.toArray('org.github.foxnic.web.constants.enums.system.MenuType')}" style="width:140px"></div>

                    </div>
                    <!-- 选择框(字典) , selectDict ,typeName=select_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('选择框(字典)')}" class="search-label selectDict-label">选择框(字典)</span><span class="search-colon">:</span></div>
                        <div id="selectDict" th:data="${dict.toArray('order_status')}" style="width:150px" extraParam="{}"></div>
                    </div>


                </div>
                <!-- 搜索输入区域 -->
                <div class="layui-form toolbar search-inputs">
                    <!-- 日期 , birthday ,typeName=date_input, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:50px"><span th:text="${lang.translate('日期')}" class="search-label birthday-label">日期</span><span class="search-colon">:</span></div>
                            <input type="text" id="birthday-begin" style="width: 180px" lay-verify="date" th:placeholder="${lang.translate('开始日期')}" autocomplete="off" class="layui-input search-input search-date-input"  readonly >
                            <span class="search-dash">-</span>
                            <input type="text" id="birthday-end"  style="width: 180px"  lay-verify="date" th:placeholder="${lang.translate('结束日期')}" autocomplete="off" class="layui-input search-input search-date-input" readonly>
                    </div>
                    <!-- 选择框(枚举) , selectEnum ,typeName=select_box, isHideInSearch=false -->
                    <div class="search-unit">
                        <div class="search-label-div" style="width:100px"><span th:text="${lang.translate('选择框(枚举)')}" class="search-label selectEnum-label">选择框(枚举)</span><span class="search-colon">:</span></div>
                        <div id="selectEnum" th:data="${enum.toArray('org.github.foxnic.web.constants.enums.system.SystemConfigType')}" style="width:140px" extraParam="{}"></div>
                    </div>


                </div>
            </div>


            <!-- 按钮区域 -->
            <div class="layui-form toolbar search-buttons" style="opacity: 0">
                <button id="search-button" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>&nbsp;&nbsp;<span th:text="${lang.translate('搜索')}">搜索</span></button>
                <button id="search-button-advance" class="layui-btn layui-btn-primary icon-btn search-button-advance"><i class="layui-icon">&#xe671;</i><span th:text="${lang.translate('更多')}">更多</span></button>
            </div>
        </div>

        <div style="margin-top: 126px ">
            <table class="layui-table" id="data-table" lay-filter="data-table"></table>
        </div>

    </div>
</div>

<script type="text/javascript" src="/module/global.js" th:src="'/module/global.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/jquery-3.2.1.min.js" th:src="'/assets/libs/jquery-3.2.1.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/pandyle.min.js" th:src="'/assets/libs/pandyle.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/layui/layui.js" th:src="'/assets/libs/layui/layui.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/toast/js/toast.js" th:src="'/assets/libs/toast/js/toast.js?'+${cacheKey}"></script>

<!-- 表格工具栏 -->
<script type="text/html" id="toolbarTemplate">
    <div class="layui-btn-container">
        <button th:if="${perm.checkAuth('sys_code_example:create')}" id="add-button" class="layui-btn icon-btn layui-btn-sm create-new-button " lay-event="create"><i class="layui-icon">&#xe654;</i><span th:text="${lang.translate('新建')}">新建</span></button>
        <button th:if="${perm.checkAuth('sys_code_example:delete-by-ids')}" id="delete-button" class="layui-btn icon-btn layui-btn-danger layui-btn-sm batch-delete-button " lay-event="batch-del"><i class="layui-icon">&#xe67e;</i><span th:text="${lang.translate('删除')}">删除</span></button>
        <button id="test-tool-button1"  class="layui-btn icon-btn layui-btn-sm  layui-btn-primary layui-border-red " lay-event="tool-test-tool-button1"><span th:text="${lang.translate('测试-1')}">测试-1</span></button>
        <button id="test-tool-button2"  class="layui-btn icon-btn layui-btn-sm  layui-btn-primary layui-border-blue " lay-event="tool-test-tool-button2"> <li class='fa fa-superpowers'></li> <span th:text="${lang.translate('测试-2')}">测试-2</span></button>
    </div>
</script>

<!-- 表格操作列 -->
<script type="text/html" id="tableOperationTemplate">

    <button th:if="${perm.checkAuth('sys_code_example:view-form')}" class="layui-btn layui-btn-primary layui-btn-xs ops-view-button " lay-event="view" th:text="${lang.translate('查看')}" data-id="{{d.id}}">查看</button>
    <button th:if="${perm.checkAnyAuth('sys_code_example:update','sys_code_example:save')}" class="layui-btn layui-btn-primary layui-btn-xs ops-edit-button " lay-event="edit" th:text="${lang.translate('修改')}" data-id="{{d.id}}">修改</button>


    <button th:if="${perm.checkAuth('sys_code_example:delete')}" class="layui-btn layui-btn-xs layui-btn-danger ops-delete-button " lay-event="del" th:text="${lang.translate('删除')}" data-id="{{d.id}}">删除</button>

    <button class="layui-btn layui-btn-xs  layui-btn-primary layui-border-red " lay-event="do-test-action" th:text="${lang.translate('测试')}" data-id="{{d.id}}">测试</button>

    <button class="layui-btn layui-btn-xs layui-btn-primary layui-border-blue" lay-event="ops-more" data-id="{{d.id}}"><span th:text="${lang.translate('更多')}">更多</span><i class="layui-icon layui-icon-down"></i></button>
</script>

<!-- 表格状态列 -->
<script type="text/html" id="cell-tpl-valid">
    <input type="checkbox" class="switch-valid list-checkbox" lay-filter="cell-tpl-valid" value="{{d.id}}" lay-skin="switch" lay-text="有效|无效&nbsp;"  {{d.valid==1?'checked':''}} data-id="{{d.id}}"/>
</script>

<script th:inline="javascript">
    var LAYUI_TABLE_WIDTH_CONFIG = [[${pageHelper.getTableColumnWidthConfig('data-table')}]];
    var RADIO_RADIOENUM_DATA = [[${enum.toArray('org.github.foxnic.web.constants.enums.system.Language')}]];
    var RADIO_RADIODICT_DATA = [[${dict.toArray('sex')}]];
    var CHECK_CHECKENUM_DATA = [[${enum.toArray('org.github.foxnic.web.constants.enums.system.MenuType')}]];
    var CHECK_CHECKDICT_DATA = [[${dict.toArray('order_status')}]];
    var SELECT_SELECTENUM_DATA = [[${enum.toArray('org.github.foxnic.web.constants.enums.system.SystemConfigType')}]];
    var SELECT_SELECTDICT_DATA = [[${dict.toArray('order_status')}]];
    var AUTH_PREFIX="sys_code_example";

    // 列表测试变量
    var TEST_LIST = [[${enum.toArray('org.github.foxnic.web.constants.enums.system.Language')}]] ;

</script>

<script th:src="'/business/system/code_example/code_example_ext.js?'+${cacheKey}"></script>
<script th:src="'/business/system/code_example/code_example_list.js?'+${cacheKey}"></script>

</body>
</html>